import React from "react";
import { useSelector } from "react-redux";

export default function Redux2() {
  // 通过 useSelector 接收Redux中的数据
  const state = useSelector((state) => {
    return state.count
  })
  return (
    <div style={{ border: '2px solid red' }}>
      <h5>我是Redux2组件</h5>
      <div>count:{state}</div>
    </div>
  )
}